
    import {
        DIC
    } from '@/const/dic';
    import Store from '../../store/';
    const allPermission = Store.state.user.permission;
    const isAdmin = Store.state.user.userInfo.superAdmin;
    export const rechargeSettingsTableOption = {
        border: false,
        index: false,
        selection: false,
        calcHeight: 250,
        columnBtn:false,
        searchClearable: false,
        selectClearBtn: false,
        searchResetBtn: false,
        height:"auto",
        menu: true,
        menuAlign: "center",
        searchBtn: true,
        labelWidth: 120,
        refreshBtn: true,
        tip:false,
        addBtn: isAdmin || !!allPermission['/admin/recharge_settings/add'],
        dialogWidth: '400px',
        dialogHeight: 'auto',
        menuWidth: 180,
        editBtn: isAdmin || !!allPermission['/admin/recharge_settings/modify'],
        viewBtn: false,
        delBtn: isAdmin || !!allPermission['/admin/recharge_settings/delete'],
        column: [
    {
        "label": "充值金额(¥)",
        "prop": "payAmount",
        "search": false,
        "type": "number",
        "fixed": false,
        "width": "auto",
        "row": true,
        precision:2,
        "minWidth": "120",
        "readonly": false,
        "span": 22,
        "display": true,
        "hide": false,
        "rules": [
            {
                "required": true,
                "message": "请输入充值金额",
                "trigger": "blur"
            },
            {
                message:'充值金额必须大于0',
                trigger:'blur',
                validator:(rule,value,callback)=>{
                    if(value <= 0 ) {
                        callback(new Error('充值金额必须大于0'));
                    } else {
                        callback();
                    }
                }
            }
        ]
    },
    {
        "label": "兑换钻石数量",
        "prop": "diamondNum",
        "search": false,
        "type": "number",
        formslot:true,
        "fixed": false,
        "width": "auto",
        "row": true,
        "minWidth": "120",
        "readonly": false,
        "span": 22,
        "display": true,
        "hide": false,
        // "rules": [
        //     {
        //         "required": true,
        //         "message": "请输入兑换钻石数量",
        //         "trigger": "blur"
        //     },
        //     {
        //         trigger:'blur',
        //         validator:(rule,value,callback)=>{
        //             if(value <= 0 ) {
        //                 callback(new Error('兑换钻石数量必须大于0'));
        //             } else {
        //                 callback();
        //             }
        //         }
        //     }
        // ]
    },
    {
        "label": "创建时间",
        "prop": "createTime",
        "search": false,
        "type": "datetime",
        "fixed": false,
        "width": "170",
        "row": false,
        "readonly": false,
        "span": 20,
        "display": false,
        "hide": false,
        "format": "yyyy-MM-dd HH:mm:ss",
        "valueFormat": "yyyy-MM-dd HH:mm:ss"
    },
    {
        "label": "创建人",
        "prop": "creator",
        "search": false,
        "type": "text",
        "fixed": false,
        "width": "auto",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": false,
        "hide": false
    },
    {
        "label": "修改时间",
        "prop": "modifyTime",
        "search": false,
        "type": "datetime",
        "fixed": false,
        "width": "170",
        "row": false,
        "readonly": false,
        "span": 12,
        "display": false,
        "hide": false,
        "format": "yyyy-MM-dd HH:mm:ss",
        "valueFormat": "yyyy-MM-dd HH:mm:ss"
    },
    {
        "label": "修改人",
        "prop": "modifier",
        "search": false,
        "type": "text",
        "fixed": false,
        "width": "auto",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": false,
        "hide": false
    }
]
    };
